package com.gsc.funnycode.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gsc.funnycode.entity.AddMoney;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: Orange
 * @Date: 15:30 2022/5/1
 */
@Mapper
public interface AddMoneyMapper extends BaseMapper<AddMoney> {
    @Select("select a.* from user u left join add_money a on u.user_id = a.uid where u.account = #{account} order by date desc")
    List<AddMoney> getListByUid(String account);
    @Select("select type from add_money group by type")
    List<String> getTypes();
}
